<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var money = 100;
      while (true) {
        var caozuo = prompt(
          `请输入您要的操作：\n1.存钱\n2.取钱\n3.显示余额\n4.退出`
        );
        if (caozuo == "1") {
          var nowmoney = +prompt("请输入您要存入的现金金额");
          money = money + nowmoney;
          alert(money);
        } else if (caozuo == "2") {
          var dowmmoney = prompt("请输入您要取走的金额");
          if (dowmmoney > money) {
            alert("没有这么多钱奥，请重新操作");
            continue;
          } else {
            money = money - dowmmoney;
          }
          alert(money);
        } else if (caozuo == "3") {
          alert(money);
        } else {
          alert("现在将退出系统");
          break;
        }
      }
    </script>
  </body>
</html>
